#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "rngs.h"

#define DEBUG 0
#define NOISY_TEST 1

// Function being tested: int getCost(...) {...}

char *titleList[] = {"curse", "estate", "duchy", "province", "copper", "silver", "gold", "adventurer", "council_room", "feast", "gardens", "mine", "remodel", "smithy", "village", "baron", "great_hall", "minion", "stweard", "tribute", "ambassador", "cutpurse", "embargo", "outpost", "salvager", "sea_hag", "treasure_map"};

int priceList[] = {0,2,5,8,0,3,6,6,5,4,4,5,4,4,3,4,3,5,3,5,3,4,2,5,4,4,4};

int TgetCost(int cardNum, char *cardTitle)
{
  int i;
  for(i = 0; i < 27; i++){
    if(strcmp(cardTitle, titleList[i]) == 0){
      assert(getCost(cardNum) == priceList[i]);
    }
  }
  return 0;
}


int main()
{
  int x;
  printf("Now Testing: int getCost(...){...}\n");
 
  for(x = 0; x < 1000; x++){
    int r = Random() * 27;
    TgetCost(r, titleList[r]);
  }

  printf("Everything checks out according to this test.\n");

  return 0;
}
